package com.yuanfeng.business.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.commoms.vo.shop.WebShopListQueryResultVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ShopEvaluationController
 * @Description 店铺评分
 * @Author hyq
 * @Date 2023/6/21 10:26
 * @Version 1.0
 **/
@RestController
@RequestMapping("shop/evaluation")
public class ShopEvaluationController extends BaseController{

    /**
     * 添加店铺评分
     *
     * @param param
     * @return
     */
    @PostMapping("/saveShopEvaluationInfo")
    public ResponseResult saveShopEvaluationInfo(@RequestBody Map<String, Object> param) {
        ResponseResult result = shopEvaluationService.saveShopEvaluationInfo(param);
        return result;
    }


    /**
     * 放入店铺评分与百分比
     *
     * @param param
     * @return
     */
    @RequestMapping("queryShopScore")
    public List<WebShopListQueryResultVO> queryShopScore(@RequestBody List<WebShopListQueryResultVO> param){
        List<WebShopListQueryResultVO> list = shopEvaluationService.queryShopScore(param);
        return list;
    }
}
